//
//  HWButtonExtension.swift
//  WoWoLiveAssistant
//
//  Created by 王昌健 on 2021/10/28.
//

import UIKit

extension UIButton {
    
    open override func point(inside point: CGPoint, with event: UIEvent?) -> Bool {
        
        var bounds = self.bounds
        var widthDelta = 44.0 - bounds.size.width
        if widthDelta > 0 {
            
        }else{
            widthDelta = 0
        }
        
        var heightDelta = 44.0 - bounds.size.height
        if heightDelta > 0 {
            
        }else{
            heightDelta = 0
        }
        
        bounds = bounds.insetBy(dx: -0.5 * widthDelta, dy: -0.5 * heightDelta)
        return bounds.contains(point)
        
    }
    
}
